MAPS

Kuwait Roads

Vector Map

Photo by Hamed Alayoub on Unsplash

Photo by Hamed Alayoub on Unsplash

Jahra, Kuwait

A person often meets his destiny on the road he took to avoid it…
— Jean de La Fontaine


Ingest

border geometry for admin levels

Administrative boundaries at adm0 and adm1 levels

# Load map sources
# ++++++++++++++++++++
# using the same map sources up to adm1 which refers to Governorates in Kuwait
adm0 <- st_read("archetypes/kuwait/kuwait-adm0.geojson")
## Reading layer `kuwait_adm0' from data source 
##   `C:\Users\jaybe\Desktop\kamino-public\kamino-source\sources\10-maps\1-map-making\4-vector\archetypes\kuwait\kuwait-adm0.geojson' 
##   using driver `GeoJSON'
## Simple feature collection with 1 feature and 67 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 46.55062 ymin: 28.52461 xmax: 48.65403 ymax: 30.08444
## Geodetic CRS:  WGS 84
adm1 <- st_read("archetypes/kuwait/kuwait-adm1.geojson")
## Reading layer `kuwait_adm1' from data source 
##   `C:\Users\jaybe\Desktop\kamino-public\kamino-source\sources\10-maps\1-map-making\4-vector\archetypes\kuwait\kuwait-adm1.geojson' 
##   using driver `GeoJSON'
## Simple feature collection with 6 features and 12 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 46.55062 ymin: 28.52461 xmax: 48.65403 ymax: 30.08444
## Geodetic CRS:  WGS 84
head(as.data.frame(adm0))
head(as.data.frame(adm1))

road geometry

df_road_lines <- st_read("archetypes/kuwait/kwt_roads_lines.json")
## Reading layer `kwt_roads_lines' from data source 
##   `C:\Users\jaybe\Desktop\kamino-public\kamino-source\sources\10-maps\1-map-making\4-vector\archetypes\kuwait\kwt_roads_lines.json' 
##   using driver `GeoJSON'
## Simple feature collection with 83569 features and 11 fields
## Geometry type: MULTILINESTRING
## Dimension:     XY
## Bounding box:  xmin: 46.54018 ymin: 28.51005 xmax: 48.42561 ymax: 30.10855
## Geodetic CRS:  WGS 84
head(as.data.frame(df_road_lines))

Plot

border base map

theme_opts <- theme(
  legend.position = "none",
  legend.title = element_blank(),
  axis.text = element_blank(),
  axis.line = element_blank(),
  axis.ticks = element_blank(),
  axis.title = element_blank(),
  panel.grid = element_blank(),
  panel.grid.major = element_blank(),
  panel.grid.minor = element_blank(),
  # panel.background = element_blank(),
  panel.background = element_rect(fill = "#ffffff"),
  panel.border = element_blank(),
  # plot.background = element_blank(),
  plot.background = element_rect(fill = "#ffffff")
)

transparent_fill <- rgb(0, 0, 0, max = 255, alpha = 0, names = "transparent")

# In order of layer placement top -> down
# using adm0 map sources which contains info of area of the country
v1 <- ggplot() +
  geom_sf(data = adm0, color="#333333", fill = transparent_fill, size=1.0) +
  geom_sf(data = adm1, color="#333333", fill = transparent_fill, size=0.5) +
  scale_x_continuous() +
  scale_y_continuous() +
  coord_sf() +
  theme_bw() +
  labs(x = NULL, # Longitude
       y = NULL, # Latitude
       title = NULL, 
       subtitle = NULL) +
  theme_opts

girafe(ggobj = v1, width_svg = 16, height_svg = 14,
       options = list(opts_sizing(rescale = TRUE, width = 0.6)))

Plot

with road lines

v2 <- v1 + geom_sf( data = df_road_lines, color = "#8A4B08", size = 0.25 )

girafe(ggobj = v2, width_svg = 16, height_svg = 14,
       options = list(opts_sizing(rescale = TRUE, width = 0.6)))

References

citations for narrative and data sources

  • Narrative and Data sources: HDX, GO